package f;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.List;

/* compiled from: Dns */
public interface l {
    public static final l a = new a();

    /* compiled from: Dns */
    public class a implements l {
        public List<InetAddress> a(String str) throws UnknownHostException {
            if (str != null) {
                try {
                    str = Arrays.asList(InetAddress.getAllByName(str));
                    return str;
                } catch (NullPointerException e) {
                    UnknownHostException unknownHostException = new UnknownHostException(c.b.a.a.a.D("Broken system behaviour for dns lookup of ", str));
                    unknownHostException.initCause(e);
                    throw unknownHostException;
                }
            }
            throw new UnknownHostException("hostname == null");
        }
    }
}
